import Vue from 'vue';
import Router from 'vue-router';
import HelloWorld from '@/components/HelloWorld';
import Home from "@/views/home/Home";
import AddDevice from "@/views/device/AddDevice";
import Product from "@/views/device/Product";
import ProductNoGateway from "@/views/device/ProductNoGateway";
import ContactGateway from "@/views/device/ContactGateway";
import AddGatewayStep1 from "@/views/device/AddGatewayStep1";
import AddGatewayStep2 from "@/views/device/AddGatewayStep2";
import AddGatewayStep3 from "@/views/device/AddGatewayStep3";
import AddGatewaySuccess from "@/views/device/AddGatewaySuccess";
import GuaranteeCard from "@/views/device/GuaranteeCard";
import LogData from "@/views/device/LogData";
import Share from "@/views/device/Share";
import RemoteSharePassword from "@/views/device/RemoteSharePassword";
import GenerateSharePassword from "@/views/device/GenerateSharePassword";

import UserList from "@/views/user/UserList";
import AddUser from "@/views/user/AddUser";
import DetailUser from "@/views/user/DetailUser";
import ManagerKeys from "@/views/user/ManagerKeys";
import AddUserStep from "@/views/user/AddUserStep";
import Rename from "@/views/user/Rename";

import ShareList from "@/views/user/ShareList";


Vue.use(Router)

export default new Router({
    routes: [
        {
            path: '/',
            name: 'HelloWorld',
            component: HelloWorld,
            redirect:'/home'
        },
        {
            path: '/home',
            name: 'home',
            component: Home,
            meta: {title: '设备管理'},
        },
        {
            path: '/addDevice',
            name: 'addDevice',
            component: AddDevice,
            meta: {title: '绑定设备'},
        },
        {
            path: '/product',
            name: 'product',
            component: Product,
            meta: {title: '门锁信息（二代）'},
        },
        {
            path: '/productNoGateway',
            name: 'productNoGateway',
            component: ProductNoGateway,
            meta: {title: '门锁信息（二代，无网关）'},
        },
        {
            path: '/remoteSharePassword',
            name: 'remoteSharePassword',
            component:RemoteSharePassword,
            meta: { title: '分享临时密码' },
        },
        {
            path: '/generateSharePassword',
            name: 'generateSharePassword',
            component:GenerateSharePassword,
            meta: { title: '生成远程分享密码' },
        },
        {
            path: '/contactGateway',
            name: 'contactGateway',
            component: ContactGateway,
            meta: {title: '关联网关'},
        },
        {
            path: '/addGatewayStep1',
            name: 'addGatewayStep1',
            component: AddGatewayStep1,
            meta: { title: '添加网关步骤一' },
        },
        {
            path: '/addGatewayStep2',
            name: 'addGatewayStep2',
            component: AddGatewayStep2,
            meta: { title: '添加网关步骤二' },
        },
        {
            path: '/addGatewayStep3',
            name: 'addGatewayStep3',
            component: AddGatewayStep3,
            meta: { title: '添加网关步骤三' },
        },
        {
            path: '/addGatewaySuccess',
            name: 'addGatewaySuccess',
            component: AddGatewaySuccess,
            meta: { title: '添加网关成功' },
        },
        {
            path: '/guaranteeCard',
            name: 'guaranteeCard',
            component:GuaranteeCard,
            meta: { title: '保修卡' },
        },
        {
            path: '/logData',
            name: 'logData',
            component:LogData,
            meta: { title: '日志信息' },
        },
        {
            path: '/share',
            name: 'share',
            component: Share,
            meta: { title: '分享二维码' },
        },
        {
            path: '/userList',
            name: 'userList',
            component: UserList,
            meta: { title: '用户列表' },
        },
        {
            path: '/addUser',
            name: 'addUser',
            component:AddUser,
            meta: { title: '添加用户' },
        },
        {
            path: '/detailUser',
            name: 'detailUser',
            component:DetailUser,
            meta: { title: '用户详情' },
        },
        {
            path: '/managerKeys',
            name: 'managerKeys',
            component:ManagerKeys,
            meta: { title: '管理钥匙' },
        },
        {
            path: '/addUserStep',
            name: 'addUserStep',
            component:AddUserStep,
            meta: { title: '添加用户步骤' },
        },
        {
            path: '/rename',
            name: 'rename',
            component:Rename,
            meta: { title: '用户重命名' },
        },

        {
            path: '/shareList',
            name: 'shareList',
            component: ShareList,
            meta: { title: '分享列表' },
        }
    ]
})
